<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DM-CtrlH7-BF-DevProgram: C:/Users/ASUS/Desktop/dm-ctrlH7-balance-9025test/Drivers/CMSIS/Include/mpu_armv7.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="50x5.png"/></td>
  <td id="projectalign">
   <div id="projectname">DM-CtrlH7-BF-DevProgram<span id="projectnumber">&#160;beta 0.1</span>
   </div>
   <div id="projectbrief">C.ONE Studio Damiao Development Board Framework</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search',true);
  $(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(function(){initNavTree('mpu__armv7_8h_source.html','',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">mpu_armv7.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/******************************************************************************</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * @file     mpu_armv7.h</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> * @brief    CMSIS MPU API for Armv7-M MPU</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * @version  V5.1.0</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> * @date     08. March 2019</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"> ******************************************************************************/</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">/*</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"> * Copyright (c) 2017-2019 Arm Limited. All rights reserved.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"> *</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment"> * SPDX-License-Identifier: Apache-2.0</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment"> *</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment"> * Licensed under the Apache License, Version 2.0 (the License); you may</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment"> * not use this file except in compliance with the License.</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment"> *</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment"> * www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment"> *</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment"> * distributed under the License is distributed on an AS IS BASIS, WITHOUT</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="comment"> * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="comment"> * limitations under the License.</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="comment"> */</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">#if   defined ( __ICCARM__ )</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="preprocessor">  #pragma system_include         </span><span class="comment">/* treat file as system include file for MISRA check */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="preprocessor">#elif defined (__clang__)</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="preprocessor">  #pragma clang system_header    </span><span class="comment">/* treat file as system include file */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="preprocessor">#ifndef ARM_MPU_ARMV7_H</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#define ARM_MPU_ARMV7_H</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_32B      ((uint8_t)0x04U) </span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_64B      ((uint8_t)0x05U) </span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_128B     ((uint8_t)0x06U) </span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_256B     ((uint8_t)0x07U) </span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_512B     ((uint8_t)0x08U) </span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_1KB      ((uint8_t)0x09U) </span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_2KB      ((uint8_t)0x0AU) </span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_4KB      ((uint8_t)0x0BU) </span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_8KB      ((uint8_t)0x0CU) </span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_16KB     ((uint8_t)0x0DU) </span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_32KB     ((uint8_t)0x0EU) </span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_64KB     ((uint8_t)0x0FU) </span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_128KB    ((uint8_t)0x10U) </span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_256KB    ((uint8_t)0x11U) </span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_512KB    ((uint8_t)0x12U) </span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_1MB      ((uint8_t)0x13U) </span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_2MB      ((uint8_t)0x14U) </span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_4MB      ((uint8_t)0x15U) </span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_8MB      ((uint8_t)0x16U) </span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_16MB     ((uint8_t)0x17U) </span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_32MB     ((uint8_t)0x18U) </span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_64MB     ((uint8_t)0x19U) </span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_128MB    ((uint8_t)0x1AU) </span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_256MB    ((uint8_t)0x1BU) </span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_512MB    ((uint8_t)0x1CU) </span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_1GB      ((uint8_t)0x1DU) </span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_2GB      ((uint8_t)0x1EU) </span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span><span class="preprocessor">#define ARM_MPU_REGION_SIZE_4GB      ((uint8_t)0x1FU) </span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span><span class="preprocessor">#define ARM_MPU_AP_NONE 0U </span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="preprocessor">#define ARM_MPU_AP_PRIV 1U </span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span><span class="preprocessor">#define ARM_MPU_AP_URO  2U </span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span><span class="preprocessor">#define ARM_MPU_AP_FULL 3U </span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="preprocessor">#define ARM_MPU_AP_PRO  5U </span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span><span class="preprocessor">#define ARM_MPU_AP_RO   6U </span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span><span class="preprocessor">#define ARM_MPU_RBAR(Region, BaseAddress) \</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span><span class="preprocessor">  (((BaseAddress) &amp; MPU_RBAR_ADDR_Msk) |  \</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span><span class="preprocessor">   ((Region) &amp; MPU_RBAR_REGION_Msk)    |  \</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span><span class="preprocessor">   (MPU_RBAR_VALID_Msk))</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>  </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span><span class="preprocessor">#define ARM_MPU_ACCESS_(TypeExtField, IsShareable, IsCacheable, IsBufferable)   \</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="preprocessor">  ((((TypeExtField) &lt;&lt; MPU_RASR_TEX_Pos) &amp; MPU_RASR_TEX_Msk)                  | \</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span><span class="preprocessor">   (((IsShareable)  &lt;&lt; MPU_RASR_S_Pos)   &amp; MPU_RASR_S_Msk)                    | \</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span><span class="preprocessor">   (((IsCacheable)  &lt;&lt; MPU_RASR_C_Pos)   &amp; MPU_RASR_C_Msk)                    | \</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span><span class="preprocessor">   (((IsBufferable) &lt;&lt; MPU_RASR_B_Pos)   &amp; MPU_RASR_B_Msk))</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span><span class="preprocessor">#define ARM_MPU_RASR_EX(DisableExec, AccessPermission, AccessAttributes, SubRegionDisable, Size)    \</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span><span class="preprocessor">  ((((DisableExec)      &lt;&lt; MPU_RASR_XN_Pos)   &amp; MPU_RASR_XN_Msk)                                  | \</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span><span class="preprocessor">   (((AccessPermission) &lt;&lt; MPU_RASR_AP_Pos)   &amp; MPU_RASR_AP_Msk)                                  | \</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span><span class="preprocessor">   (((AccessAttributes) &amp; (MPU_RASR_TEX_Msk | MPU_RASR_S_Msk | MPU_RASR_C_Msk | MPU_RASR_B_Msk))) | \</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span><span class="preprocessor">   (((SubRegionDisable) &lt;&lt; MPU_RASR_SRD_Pos)  &amp; MPU_RASR_SRD_Msk)                                 | \</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span><span class="preprocessor">   (((Size)             &lt;&lt; MPU_RASR_SIZE_Pos) &amp; MPU_RASR_SIZE_Msk)                                | \</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span><span class="preprocessor">   (((MPU_RASR_ENABLE_Msk))))</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>                         </div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span><span class="preprocessor">#define ARM_MPU_RASR(DisableExec, AccessPermission, TypeExtField, IsShareable, IsCacheable, IsBufferable, SubRegionDisable, Size) \</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span><span class="preprocessor">  ARM_MPU_RASR_EX(DisableExec, AccessPermission, ARM_MPU_ACCESS_(TypeExtField, IsShareable, IsCacheable, IsBufferable), SubRegionDisable, Size)</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span> </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span><span class="preprocessor">#define ARM_MPU_ACCESS_ORDERED ARM_MPU_ACCESS_(0U, 1U, 0U, 0U)</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span><span class="preprocessor">#define ARM_MPU_ACCESS_DEVICE(IsShareable) ((IsShareable) ? ARM_MPU_ACCESS_(0U, 1U, 0U, 1U) : ARM_MPU_ACCESS_(2U, 0U, 0U, 0U))</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span> </div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span><span class="preprocessor">#define ARM_MPU_ACCESS_NORMAL(OuterCp, InnerCp, IsShareable) ARM_MPU_ACCESS_((4U | (OuterCp)), IsShareable, ((InnerCp) &amp; 2U), ((InnerCp) &amp; 1U))</span></div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span></div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span><span class="preprocessor">#define ARM_MPU_CACHEP_NOCACHE 0U</span></div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span></div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span><span class="preprocessor">#define ARM_MPU_CACHEP_WB_WRA 1U</span></div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span></div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span><span class="preprocessor">#define ARM_MPU_CACHEP_WT_NWA 2U</span></div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span><span class="preprocessor">#define ARM_MPU_CACHEP_WB_NWA 3U</span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span> </div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span></div>
<div class="foldopen" id="foldopen00183" data-start="{" data-end="};">
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"><a class="line" href="struct_a_r_m___m_p_u___region__t.html">  183</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"><a class="line" href="struct_a_r_m___m_p_u___region__t.html#afe7a7721aa08988d915670efa432cdd2">  184</a></span>  uint32_t <a class="code hl_variable" href="struct_a_r_m___m_p_u___region__t.html#afe7a7721aa08988d915670efa432cdd2">RBAR</a>; </div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"><a class="line" href="struct_a_r_m___m_p_u___region__t.html#a38c1d3bc6a9ffc9423d633add01928f1">  185</a></span>  uint32_t <a class="code hl_variable" href="struct_a_r_m___m_p_u___region__t.html#a38c1d3bc6a9ffc9423d633add01928f1">RASR</a>; </div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span>} <a class="code hl_struct" href="struct_a_r_m___m_p_u___region__t.html">ARM_MPU_Region_t</a>;</div>
</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span>    </div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>__STATIC_INLINE <span class="keywordtype">void</span> ARM_MPU_Enable(uint32_t MPU_Control)</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span>{</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span>  <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a>-&gt;CTRL = MPU_Control | <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gae72b283f6e38b641c877182f03d95844">MPU_CTRL_ENABLE_Msk</a>;</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span><span class="preprocessor">#ifdef SCB_SHCSR_MEMFAULTENA_Msk</span></div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span>  <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaaaf6477c2bde2f00f99e3c2fd1060b01">SCB</a>-&gt;SHCSR |= <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaf084424fa1f69bea36a1c44899d83d17">SCB_SHCSR_MEMFAULTENA_Msk</a>;</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span>  <a class="code hl_define" href="group___c_m_s_i_s___core___instruction_interface.html#ga067d257a2b34565410acefb5afef2203">__DSB</a>();</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>  <a class="code hl_define" href="group___c_m_s_i_s___core___instruction_interface.html#gaad233022e850a009fc6f7602be1182f6">__ISB</a>();</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span>}</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span></div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span>__STATIC_INLINE <span class="keywordtype">void</span> ARM_MPU_Disable(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span>{</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span>  <a class="code hl_define" href="group___c_m_s_i_s___core___instruction_interface.html#ga671101179b5943990785f36f8c1e2269">__DMB</a>();</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span><span class="preprocessor">#ifdef SCB_SHCSR_MEMFAULTENA_Msk</span></div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span>  <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaaaf6477c2bde2f00f99e3c2fd1060b01">SCB</a>-&gt;SHCSR &amp;= <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaf084424fa1f69bea36a1c44899d83d17">~SCB_SHCSR_MEMFAULTENA_Msk</a>;</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span>  <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a>-&gt;CTRL  &amp;= <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gae72b283f6e38b641c877182f03d95844">~MPU_CTRL_ENABLE_Msk</a>;</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span>}</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span></div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span>__STATIC_INLINE <span class="keywordtype">void</span> ARM_MPU_ClrRegion(uint32_t rnr)</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span>{</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span>  <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a>-&gt;RNR = rnr;</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span>  <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a>-&gt;RASR = 0U;</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>}</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>   </div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno">  225</span>__STATIC_INLINE <span class="keywordtype">void</span> ARM_MPU_SetRegion(uint32_t rbar, uint32_t rasr)</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno">  226</span>{</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span>  <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a>-&gt;RBAR = rbar;</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span>  <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a>-&gt;RASR = rasr;</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span>}</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span>   </div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span>__STATIC_INLINE <span class="keywordtype">void</span> ARM_MPU_SetRegionEx(uint32_t rnr, uint32_t rbar, uint32_t rasr)</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>{</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span>  <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a>-&gt;RNR = rnr;</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span>  <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a>-&gt;RBAR = rbar;</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno">  240</span>  <a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a>-&gt;RASR = rasr;</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span>}</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno">  242</span></div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno">  248</span>__STATIC_INLINE <span class="keywordtype">void</span> ARM_MPU_OrderedMemcpy(<span class="keyword">volatile</span> uint32_t* dst, <span class="keyword">const</span> uint32_t* __RESTRICT src, uint32_t len)</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno">  249</span>{</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span>  uint32_t i;</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno">  251</span>  <span class="keywordflow">for</span> (i = 0U; i &lt; len; ++i) </div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno">  252</span>  {</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span>    dst[i] = src[i];</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno">  254</span>  }</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span>}</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span></div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span>__STATIC_INLINE <span class="keywordtype">void</span> ARM_MPU_Load(<a class="code hl_struct" href="struct_a_r_m___m_p_u___region__t.html">ARM_MPU_Region_t</a> <span class="keyword">const</span>* table, uint32_t cnt) </div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno">  262</span>{</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno">  263</span>  <span class="keyword">const</span> uint32_t rowWordSize = <span class="keyword">sizeof</span>(<a class="code hl_struct" href="struct_a_r_m___m_p_u___region__t.html">ARM_MPU_Region_t</a>)/4U;</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno">  264</span>  <span class="keywordflow">while</span> (cnt &gt; MPU_TYPE_RALIASES) {</div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno">  265</span>    ARM_MPU_OrderedMemcpy(&amp;(<a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a>-&gt;RBAR), &amp;(table-&gt;<a class="code hl_variable" href="struct_a_r_m___m_p_u___region__t.html#afe7a7721aa08988d915670efa432cdd2">RBAR</a>), MPU_TYPE_RALIASES*rowWordSize);</div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno">  266</span>    table += MPU_TYPE_RALIASES;</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno">  267</span>    cnt -= MPU_TYPE_RALIASES;</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span>  }</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno">  269</span>  ARM_MPU_OrderedMemcpy(&amp;(<a class="code hl_define" href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a>-&gt;RBAR), &amp;(table-&gt;<a class="code hl_variable" href="struct_a_r_m___m_p_u___region__t.html#afe7a7721aa08988d915670efa432cdd2">RBAR</a>), cnt*rowWordSize);</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno">  270</span>}</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno">  271</span> </div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno">  272</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="agroup___c_m_s_i_s___c_o_r_e_html_gaaaf6477c2bde2f00f99e3c2fd1060b01"><div class="ttname"><a href="group___c_m_s_i_s___c_o_r_e.html#gaaaf6477c2bde2f00f99e3c2fd1060b01">SCB</a></div><div class="ttdeci">#define SCB</div><div class="ttdef"><b>Definition</b> core_armv81mml.h:2044</div></div>
<div class="ttc" id="agroup___c_m_s_i_s___c_o_r_e_html_gaad8182e72fe5037a6ba1eb65a1554e0b"><div class="ttname"><a href="group___c_m_s_i_s___c_o_r_e.html#gaad8182e72fe5037a6ba1eb65a1554e0b">MPU</a></div><div class="ttdeci">#define MPU</div><div class="ttdef"><b>Definition</b> core_armv81mml.h:2054</div></div>
<div class="ttc" id="agroup___c_m_s_i_s___c_o_r_e_html_gae72b283f6e38b641c877182f03d95844"><div class="ttname"><a href="group___c_m_s_i_s___c_o_r_e.html#gae72b283f6e38b641c877182f03d95844">MPU_CTRL_ENABLE_Msk</a></div><div class="ttdeci">#define MPU_CTRL_ENABLE_Msk</div><div class="ttdef"><b>Definition</b> core_armv81mml.h:1587</div></div>
<div class="ttc" id="agroup___c_m_s_i_s___c_o_r_e_html_gaf084424fa1f69bea36a1c44899d83d17"><div class="ttname"><a href="group___c_m_s_i_s___c_o_r_e.html#gaf084424fa1f69bea36a1c44899d83d17">SCB_SHCSR_MEMFAULTENA_Msk</a></div><div class="ttdeci">#define SCB_SHCSR_MEMFAULTENA_Msk</div><div class="ttdef"><b>Definition</b> core_armv81mml.h:695</div></div>
<div class="ttc" id="agroup___c_m_s_i_s___core___instruction_interface_html_ga067d257a2b34565410acefb5afef2203"><div class="ttname"><a href="group___c_m_s_i_s___core___instruction_interface.html#ga067d257a2b34565410acefb5afef2203">__DSB</a></div><div class="ttdeci">#define __DSB()</div><div class="ttdoc">Data Synchronization Barrier.</div><div class="ttdef"><b>Definition</b> cmsis_armcc.h:458</div></div>
<div class="ttc" id="agroup___c_m_s_i_s___core___instruction_interface_html_ga671101179b5943990785f36f8c1e2269"><div class="ttname"><a href="group___c_m_s_i_s___core___instruction_interface.html#ga671101179b5943990785f36f8c1e2269">__DMB</a></div><div class="ttdeci">#define __DMB()</div><div class="ttdoc">Data Memory Barrier.</div><div class="ttdef"><b>Definition</b> cmsis_armcc.h:469</div></div>
<div class="ttc" id="agroup___c_m_s_i_s___core___instruction_interface_html_gaad233022e850a009fc6f7602be1182f6"><div class="ttname"><a href="group___c_m_s_i_s___core___instruction_interface.html#gaad233022e850a009fc6f7602be1182f6">__ISB</a></div><div class="ttdeci">#define __ISB()</div><div class="ttdoc">Instruction Synchronization Barrier.</div><div class="ttdef"><b>Definition</b> cmsis_armcc.h:447</div></div>
<div class="ttc" id="astruct_a_r_m___m_p_u___region__t_html"><div class="ttname"><a href="struct_a_r_m___m_p_u___region__t.html">ARM_MPU_Region_t</a></div><div class="ttdef"><b>Definition</b> mpu_armv7.h:183</div></div>
<div class="ttc" id="astruct_a_r_m___m_p_u___region__t_html_a38c1d3bc6a9ffc9423d633add01928f1"><div class="ttname"><a href="struct_a_r_m___m_p_u___region__t.html#a38c1d3bc6a9ffc9423d633add01928f1">ARM_MPU_Region_t::RASR</a></div><div class="ttdeci">uint32_t RASR</div><div class="ttdoc">The region attribute and size register value (RASR) MPU_RASR.</div><div class="ttdef"><b>Definition</b> mpu_armv7.h:185</div></div>
<div class="ttc" id="astruct_a_r_m___m_p_u___region__t_html_afe7a7721aa08988d915670efa432cdd2"><div class="ttname"><a href="struct_a_r_m___m_p_u___region__t.html#afe7a7721aa08988d915670efa432cdd2">ARM_MPU_Region_t::RBAR</a></div><div class="ttdeci">uint32_t RBAR</div><div class="ttdoc">The region base address register value (RBAR)</div><div class="ttdef"><b>Definition</b> mpu_armv7.h:184</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
</div><!-- container -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a href="dir_60925fc218da8ca7908795bf5f624060.html">Drivers</a></li><li class="navelem"><a href="dir_bd09ff09a9c7d83a4c030dbdaee94d76.html">CMSIS</a></li><li class="navelem"><a href="dir_5d6a8c3e4e61116f4938be35d8adfd18.html">Include</a></li><li class="navelem"><b>mpu_armv7.h</b></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0 </li>
  </ul>
</div>
</body>
</html>
